package com.orange.notificationsummary;

import android.content.Context;
import android.content.SharedPreferences;

public class NotificationGlobal {
	public static final String	SAVE_SETTING				= "save_setting";
	public static final String	NOTIFICATION_SETTING		= "notification_setting";

	public static final String	CHECKBOX_SELECT_RECEIVER	= "checkbax_select_receiver";
	public static final String	UPDATE_SETTING_RECEIVER		= "update_setting_receiver";

	public static final int		MISS_CALL_EVENT				= 0;
	public static final int		SMS_EVENT					= 1;
	public static final int		MMS_EVENT					= 2;

	public static final String	MISS_CALL					= "miss_call";
	public static final String	SMS							= "sms";
	public static final String	MMS							= "mms";
	public static final String	VOICEMAIL					= "voicemail";

	public static void saveSelect(Context context, String datebaseId,
			boolean isSelect) {
		final SharedPreferences notificationSettings = context
				.getSharedPreferences(SAVE_SETTING, 0);
		notificationSettings.edit().putBoolean(datebaseId, isSelect).commit();
	};

	public static boolean getSelect(Context context, String datebaseId) {
		final SharedPreferences notificationSettings = context
				.getSharedPreferences(SAVE_SETTING, 0);
		return notificationSettings.getBoolean(datebaseId, false);
	}

	public static void clearSelect(Context context) {
		final SharedPreferences notificationSettings = context
				.getSharedPreferences(SAVE_SETTING, 0);
		notificationSettings.edit().clear().commit();
	}
}
